package cn.ai.boot.config;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

/**
 * @author jie.zhao@dms365.com
 * @Date 2025/7/8 14:38
 */
public class Test323232322 {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("A");
        list.add("B");
        list.add("C");

        list.sort(Comparator.comparing(e -> e));

        System.out.println(list.getFirst());


        Comparator<String> pathComparator = Comparator.nullsFirst(String::compareTo);

        String str = "";
        for (String s : list) {
            if (pathComparator.compare(s, str) < 0) {
                str = s;
            }
        }

        System.out.println(str);

/*        for (String s : list) {
            System.out.println(s);
        }*/


    }
}
